package com.demo.spring.di.java;

/**
 * java配置依赖注入：依赖类
 * @author Nina
 * @create 2018/8/29 下午10:38
 */
public class JavaBean1 {

    JavaBean2 javaBean2;

    public void setJavaBean2(JavaBean2 javaBean2){
        this.javaBean2 = javaBean2;
    }

    public void sayHello(){
        javaBean2.sayHello();
    }
}
